local jiaoman = fk.CreateSkill {
  name = "lingling__jiaoman",
}

Fk:loadTranslationTable{
  ["lingling__jiaoman"] = "骄满",
  [":lingling__jiaoman"] = "出牌阶段限一次，你可以摸两张牌，然后弃置手牌中所有非伤害牌。",

  ["#lingling__jiaoman"] = "骄满：摸两张牌，然后弃置所有非伤害手牌",
}

jiaoman:addEffect("active", {
  anim_type = "drawcard",
  prompt = "#lingling__jiaoman",
  can_use = function(self, player)
    return player:usedSkillTimes(jiaoman.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  on_use = function(self, room, effect)
    local player = effect.from
    player:drawCards(2, jiaoman.name)
    if player.dead then return end
    local cards = table.filter(player:getCardIds("h"), function (id)
      return not Fk:getCardById(id).is_damage_card and not player:prohibitDiscard(id)
    end)
    if #cards > 0 then
      room:throwCard(cards, jiaoman.name, player, player)
    end
  end,
})

return jiaoman
